
#include "LearnMgr.h"
#include "basis\helloWindow\HelloWindow.h"
#include "basis\helloTriangle\helloTriangle.h"
#include "Basis\Shaders\Shaders.h"
#include "Basis\Textures\Textures.h"
#include "Basis\Transformations\Transformations.h"
#include "Basis\CoordinateSystems\CoordinateSystems.h"
#include "Basis\Camera\Camera.h"
#include "Lighting\Colors\Colors.h"
#include "Lighting\BasicLighting\BasicLighting.h"
#include "Lighting\Materials\Materials.h"
#include "Lighting\LightingMaps\LightingMaps.h"
#include "Lighting\LightCasters\LightCasters.h"

LearnMgr::LearnMgr()
{
	init();
}

void LearnMgr::init()
{
#define KNOWLEDGE_INSERT(chapterName, nodeName) \
	{ \
		auto nodePtr = (LearnNodePtr)(std::make_shared<nodeName>()); \
				nodePtr->setNodeName(#nodeName); \
		nodePtr->setChapterName(#chapterName); \
		auto contentPtr = std::make_shared<KnowledgeContent>(); \
		contentPtr->setLearnNodePtr(nodePtr); \
		(m_map.insert(std::pair<KnowledgeNode, KnowledgeContentPtr>(KnowledgeNode::nodeName, contentPtr))); \
	}


	KNOWLEDGE_INSERT(Basis, HelloWindow);
	KNOWLEDGE_INSERT(Basis, HelloTriangle);
	KNOWLEDGE_INSERT(Basis, Shaders);
	KNOWLEDGE_INSERT(Basis, Textures);
	KNOWLEDGE_INSERT(Basis, Transformations);
	KNOWLEDGE_INSERT(Basis, CoordinateSystems);
	KNOWLEDGE_INSERT(Basis, Camera);

	KNOWLEDGE_INSERT(Lighting, Colors);
	KNOWLEDGE_INSERT(Lighting, BasicLighting);
	KNOWLEDGE_INSERT(Lighting, Materials);
	KNOWLEDGE_INSERT(Lighting, LightingMaps);
	KNOWLEDGE_INSERT(Lighting, LightCasters);

	
	
}